﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVPSPIKE
{
    public class PresenterMain
    {
        public IFormMain _view;
        public ICounter _counter;
        
        public PresenterMain( IFormMain view, ICounter counter)
        {
            this._view = view;
            this._counter = counter;
            this._counter.NumberChanged += Update;
            this._view.eventIncrement += Increment;
          
        }

        public void Increment()
        {
            this._counter.increment();
         
        }
        public void Update(object sender, IntEventArgs e)
        {
            this._view.update(sender, e);
        }



    }
}
